import {defineStore} from "pinia";
import https from "../utils/https";

export const useknowledge = defineStore("knowledge",{
    state:()=>{
        return{
            knowledgeLists:[] as any,
            total:0,
        }
    },actions:{
    async getknowledge(id:any){
        let res = await https.get("/api/knowledge/"+id);
        if(res.status==200){
            console.log(res.data.data,"knowledge")
            this.knowledgeLists = res.data.data
            // this.total = res.data.data[1]
        }
    }
    },getters:{

    }
})
